<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>月考核</title>
    <link rel="stylesheet" href="yuekaohe.css">
</head>

<body>
    <div>
        <ul id="par">
            <ul>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </ul>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/axios@1.1.2/dist/axios.min.js"></script>
<script>

    axios({
        url: 'http://124.220.159.29:8089/user/getAll',
        method: 'GET',
    }).then((response) => {
        const arr = response.data;
        const p = document.getElementById('par');
        console.log(arr);
        for (let i = 0; i < arr.length; i++) {
            var sArr = arr.map(function (ele, index) {
                return `<ul>
                <li><span>name:</span> ${ele.name}</li>
                <li><span>gender:</span> ${ele.gender}</li>
                <li><span>goodAt:</span> ${ele.goodAt}</li>
                <li><span>introduction:</span> ${ele.introduction}</li>
                <li><span>password:</span> ${ele.password}</li>
            </ul>`
            })
            p.innerHTML = sArr.join(' ');
        }
    })

</script>

</html>